Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Preface each macro call with comment #1052

Merged
merged 11 commits into from
Apr 6, 2022

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Apr 3, 2022

Closes #960

Examples below:

<!-- This block generates a file tree.
A guide for using macros can be found at
 https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_filetree_example(
<!-- This block generates a metadata table.
The definitions of these fields can be found in
  src/schema/objects/metadata.yaml
and a guide for using macros can be found at
 https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_metadata_table(
<!-- This block generates a columns table.
The definitions of these fields can be found in
  src/schema/objects/columns.yaml
and a guide for using macros can be found at
 https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_columns_table(
<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
  src/schema/rules/datatypes
and a guide for using macros can be found at
 https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_filename_template(datatypes=["anat"]) }}
<!--
This block generates a suffix table.
The definitions of these fields can be found in
  src/schema/rules/datatypes
and a guide for using macros can be found at
 https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_suffix_table(

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_filetree_example/i \\<!-- This block generates a file tree.\\nA guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/**/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_filetree_example/i \\<!-- This block generates a file tree.\\nA guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_metadata_table/i \\<!-- This block generates a metadata table.\\nThe definitions of these fields can be found in\\n  src/schema/objects/metadata.yaml\\nand a guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_metadata_table/i \\<!-- This block generates a metadata table.\\nThe definitions of these fields can be found in\\n  src/schema/objects/metadata.yaml\\nand a guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/**/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_columns_table/i \\<!-- This block generates a columns table.\\nThe definitions of these fields can be found in\\n  src/schema/objects/columns.yaml\\nand a guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_columns_table/i \\<!-- This block generates a columns table.\\nThe definitions of these fields can be found in\\n  src/schema/objects/columns.yaml\\nand a guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/**/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_suffix_table/i \\<!--\\nThis block generates a suffix table.\\nThe definitions of these fields can be found in\\n  src/schema/rules/datatypes\\nand a guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/**/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i '/^.*make_filename_template/i \\<!--\\nThis block generates a filename templates.\\nThe inputs for this macro can be found in the folder\\n  src/schema/rules/datatypes\\nand a guide for using macros can be found at\\n https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md\\n-->' ./src/**/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't gone through each comment, but the ones I've looked at look good to me. Thanks for this!

Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Remi-Gau

@sappelhoff sappelhoff merged commit 252e2c4 into bids-standard:master Apr 6, 2022
@sappelhoff sappelhoff changed the title [DOC] Preface each macro call with comment [MISC] Preface each macro call with comment Jul 27, 2022
@Remi-Gau Remi-Gau deleted the macro_comment branch August 17, 2022 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add HTML comments linking to documentation before macro calls in specification
4 participants